﻿@{
    ViewData["Title"] = "后台菜单管理";
}
<blockquote class="layui-elem-quote quoteBox">
    <div>
        <textarea id="des" rows="20" cols="10"></textarea>
    </div>
    <button id="btn1" type="button">解密</button>
    <div id="result"></div>
</blockquote>

@section Scripts {

    <script type="text/javascript" src="~/layui/layui.js"></script>
    <script type="text/javascript">
        layui.use(['form', 'layer'], function () {
            var form = layui.form,
                layer = parent.layer === undefined ? layui.layer : top.layer,
                $ = layui.jquery;

            $("#btn1").click(function () {
                $.ajax({
                    type: 'POST',
                    url: '/Setup/Des/',
                    data: {
                        DesStr: $("#des").val()
                    },
                    dataType: "json",
                    success: function (res) {//res为相应体,function为回调函数
                        console.log(res);
                        $("#result").html(res);
                    },
                    error: function (XMLHttpRequest, textStatus, errorThrown) {
                        layer.alert('操作失败！！！' + XMLHttpRequest.status + "|" + XMLHttpRequest.readyState + "|" + textStatus, { icon: 5 });
                    }
                });
            });

        });
    </script>
}
